package com.sxjh.entity.param;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
public class Finance7FillParam implements Serializable {

  @ApiModelProperty("回填ID")
  @NotNull(message = "回填ID不能为空")
  private Integer backfillId;

  @ApiModelProperty("物料ID")
  @NotNull(message = "物料ID不能为空")
  private Integer materialId;

  @ApiModelProperty("公司ID")
  @NotNull(message = "公司ID不能为空")
  private Integer customerUserId;

  @ApiModelProperty("合同号")
  @NotNull(message = "合同号不能为空")
  private String contractNo;

  @ApiModelProperty("质检ID")
  @NotNull(message = "质检ID不能为空")
  private Integer qaId;

  @ApiModelProperty("开始时间")
  @NotNull(message = "开始时间不能为空")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private LocalDateTime startDate;

  @ApiModelProperty("结束时间")
  @NotNull(message = "结束时间不能为空")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private LocalDateTime endDate;

  @ApiModelProperty("水分扣奖")
  @NotNull(message = "水分扣将不能为空")
  private BigDecimal water;

  @ApiModelProperty("灰分扣奖")
  @NotNull(message = "灰分扣将不能为空")
  private BigDecimal ash;

  @ApiModelProperty("硫扣奖")
  @NotNull(message = "硫分扣奖不能为空")
  private BigDecimal sulfur;

  @ApiModelProperty("挥发分扣奖")
  @NotNull(message = "挥发分扣奖不能为空")
  private BigDecimal volatilize;

  @ApiModelProperty("焦沫扣奖")
  @NotNull(message = "焦沫扣奖不能为空")
  private BigDecimal foam;

  @ApiModelProperty("m40扣奖")
  @NotNull(message = "m40扣奖不能为空")
  private BigDecimal m40;

  @ApiModelProperty("m10扣奖")
  @NotNull(message = "m10扣奖不能为空")
  private BigDecimal m10;

  @ApiModelProperty("csr扣奖")
  @NotNull(message = "csr扣奖不能为空")
  private BigDecimal csr;

  @ApiModelProperty("cri扣奖")
  @NotNull(message = "CRI扣奖不能为空")
  private BigDecimal cri;

  @ApiModelProperty("是否扣水")
  @NotNull(message = "是否扣水不能为空")
  @Min(value = 0, message = "【是否扣水】只能填，0|否,1|是")
  @Max(value = 1, message = "【是否扣水】只能填，0|否,1|是")
  private Integer deductWater;

  /**
   * 车板  最终结算总价 = 总价+运费（最终结算量 * 运费单价）
   * 两票  最终结算总价 = 总价-运费
   * 一票  无需处理
   */
  @ApiModelProperty("价格类型，0|车板,1|一票,2|两票")
  @NotNull(message = "价格类型不能为空")
  @Min(value = 0, message = "【价格类型】只能填，0|车板,1|一票,2|两票")
  @Max(value = 2, message = "【价格类型】只能填，0|车板,1|一票,2|两票")
  private Integer priceType;

  @ApiModelProperty("补途，0|无补途,1|补途1%,2|补途4%")
  @Min(value = 0, message = "【补途】只能填，0|无补途,1|补途1%,2|补途4%")
  @Max(value = 2, message = "【补途】只能填，0|无补途,1|补途1%,2|补途4%")
  private Integer complementaryWay;

  @ApiModelProperty("付款方式，0|现汇预付,1|现汇现付,2|承兑预付,3|承兑现付")
  @Min(value = 0, message = "【付款方式】只能填，0|现汇预付,1|现汇现付,2|承兑预付,3|承兑现付")
  @Max(value = 3, message = "【付款方式】只能填，0|现汇预付,1|现汇现付,2|承兑预付,3|承兑现付")
  private Integer paymentMethod;

}
